Function: extractNodes(domElement, boolOnlyReturnNode) Description: Extracts all DOM nodes within an element and returns them as a DOM fragment or element node. Returns: domFragment, domElement, or $A object if chained. Note: The extractNodes() function will return a document fragment by default, which may include multiple elements at the same logical level. However, when boolOnlyReturnNode is set to true, a standard DOM node will be returned instead. When this occurs, only the first top level container element is returned, and all others at the same logical level are ignored. The returned DOM node may contain any number of additional elements though, with no restriction. Unlike the empty() and remove() functions, extractNodes() will not remove any attached events or associated data bindings. Example: // Extract the contents of a DOM element and return a document fragment var myNodes = $A.extractNodes(domElement); // Extract the contents of a DOM element and return a DOM element node var myNode = $A.extractNodes(domElement, true); // Or the same using chaining // Extract the contents of a DOM element and return a document fragment var myChain = $A(domElement).extractNodes(); // Extract the contents of a DOM element and return a DOM element node var myChain = $A(domElement).extractNodes(true); // To return the modified element within a chain, use the "return()" method. var myElement = myChain.return();